package ch.trackedbean.server.data.dom;

import ch.trackedbean.validator.defaultValidators.*;

public class AddressDom implements Dom {
    /**
     * Property constant for {@link #getCountry()}/{@link #setCountry(CountryDom)}. Type {@link CountryDom}.
     */
    public static final String ATTR_COUNTRY = "country";

    /**
     * Property constant for {@link #getKey()}/{@link #setKey(Integer)}. Type {@link Integer}.
     */
    public static final String ATTR_KEY = "key";

    /**
     * Property constant for {@link #getPlace()}/{@link #setPlace(PlaceDom)}. Type {@link PlaceDom}.
     */
    public static final String ATTR_PLACE = "place";

    /**
     * Property constant for {@link #getStreet()}/{@link #setStreet(String)}. Type {@link String}.
     */
    public static final String ATTR_STREET = "street";

    /**
     * Property constant for {@link #getStreetNumber()}/{@link #setStreetNumber(String)}. Type {@link String}.
     */
    public static final String ATTR_STREET_NUMBER = "streetNumber";

    private Integer key;

    @Length(min = 3)
    private String street;

    private String streetNumber;

    private PlaceDom place;

    private CountryDom country;

    public AddressDom() {
    }

    /**
     * @param key
     * @param street
     * @param place
     * @param country
     */
    public AddressDom(Integer key, String street, String streetNr, PlaceDom place, CountryDom country) {
        this.key = key;
        this.street = street;
        this.place = place;
        this.country = country;
        this.streetNumber = streetNr;
    }

    /**
     * @return Returns the key.
     */
    public Integer getKey() {
        return key;
    }

    /**
     * @param key The key to set.
     */
    public void setKey(Integer key) {
        this.key = key;
    }

    /**
     * @return Returns the country.
     */
    public CountryDom getCountry() {
        return country;
    }

    /**
     * @param country The country to set.
     */
    public void setCountry(CountryDom country) {
        this.country = country;
    }

    /**
     * @return Returns the street.
     */
    public String getStreet() {
        return street;
    }

    /**
     * @param street The street to set.
     */
    public void setStreet(String street) {
        this.street = street;
    }

    /**
     * @return Returns the place.
     */
    public PlaceDom getPlace() {
        return place;
    }

    /**
     * @param place The place to set.
     */
    public void setPlace(PlaceDom place) {
        this.place = place;
    }

    /**
     * @return Returns the streetNumber.
     */
    public String getStreetNumber() {
        return streetNumber;
    }

    /**
     * @param streetNumber The streetNumber to set.
     */
    public void setStreetNumber(String streetNumber) {
        this.streetNumber = streetNumber;
    }
}
